// 商品类型
import { Decimal } from "decimal.js";

export interface GoodsType {
  id?: number;
  name: string;
  categoryId?: number;
  url?: string;
  tag?: string;
  description?: string;
  price?: Decimal;
  specifications?: [];
  selectedItems?: [];
  recommendItems?: [];
  sort?: number;
  status?: number;
}

export interface GoodsPageResponse extends ResponseData {
  data: GoodsPageType;
}

export interface GoodsPageType {
  total: number;
  records: GoodsType[];
}

export interface GoodsResponse extends ResponseData {
  data: GoodsType;
}

export interface GoodsEditResponse extends ResponseData {
  data: boolean;
}

export interface GoodsPageRequest {
  name?: string;
  status?: number;
  categoryId?: number;
  currentPage: number;
  pageSize: number;
}

// 定义全部接口返回数据都拥有ts类型
interface ResponseData {
  code: number;
  message: string;
}
